import re
with open('index.html','r',encoding='utf-8') as f:
    html=f.read()
    # print(html)
    # 换行符替换成空
    html=re.sub('\n','',html)
    # print(html)
    pattern_1='<div class="email">(.*?)</div>'
    ret=re.findall(pattern_1, html)
    print(ret[0].strip())
    '''
    str = "00000003210Runoob01230000000"; 
    print str.strip( '0' );  # 去除首尾字符 0
    str2 = "   Runoob      ";   # 去除首尾空格
    print str2.strip();
    '''

# 以字母开头，6-16位的密码，其中可以包含大小写字母、数字、下划线_
# password_patter=r'^[a-zA-Z]{1}[a-zA-Z0-9_]{5,15}$'
password_patter=r'^[a-zA-Z][a-zA-Z0-9_]{5,15}$'

pass1='1234567'
pass2='a12345'
pass3='a123'

ret1=re.match(password_patter,pass1)
ret2=re.match(password_patter,pass2)
ret3=re.match(password_patter,pass3)
print(ret1)
print(ret2)
print(ret3)